<!DOCTYPE html>
<html lang="zh-Hans">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 3.8.0">
  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

<link rel="stylesheet" href="/css/main.css">


<link rel="stylesheet" href="/lib/font-awesome/css/all.min.css">

<script id="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {"hostname":"yoursite.com","root":"/","scheme":"Gemini","version":"7.8.0","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":false,"show_result":false,"style":null},"back2top":{"enable":true,"sidebar":false,"scrollpercent":false},"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":false,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},"path":"search.xml"};
  </script>

  <meta name="description" content="返回上次所在目录12cd -cd $OLDPWD 修改权限12# 修改文件夹以及其子文件夹chmod -R 777 fileName find和grepfind是在系统中搜索符合条件的文件名，grep是在文件中搜索符合条件的字符串。1234find ~/dir -name filename.txtgrep &amp;quot;someStr&amp;quot; filename.txt# 查询某个文件夹下面大小大">
<meta name="keywords" content="linux">
<meta property="og:type" content="article">
<meta property="og:title" content="linux常用用命令">
<meta property="og:url" content="http://yoursite.com/2019/02/26/linux常用命令/index.html">
<meta property="og:site_name" content="Feng&#39;s Blog">
<meta property="og:description" content="返回上次所在目录12cd -cd $OLDPWD 修改权限12# 修改文件夹以及其子文件夹chmod -R 777 fileName find和grepfind是在系统中搜索符合条件的文件名，grep是在文件中搜索符合条件的字符串。1234find ~/dir -name filename.txtgrep &amp;quot;someStr&amp;quot; filename.txt# 查询某个文件夹下面大小大">
<meta property="og:locale" content="zh-Hans">
<meta property="og:updated_time" content="2020-08-20T04:04:55.667Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="linux常用用命令">
<meta name="twitter:description" content="返回上次所在目录12cd -cd $OLDPWD 修改权限12# 修改文件夹以及其子文件夹chmod -R 777 fileName find和grepfind是在系统中搜索符合条件的文件名，grep是在文件中搜索符合条件的字符串。1234find ~/dir -name filename.txtgrep &amp;quot;someStr&amp;quot; filename.txt# 查询某个文件夹下面大小大">

<link rel="canonical" href="http://yoursite.com/2019/02/26/linux常用命令/">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome : false,
    isPost : true,
    lang   : 'zh-Hans'
  };
</script>

  <title>linux常用用命令 | Feng's Blog</title>
  






  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage">
  <div class="container use-motion">
    <div class="headband"></div>

    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="Toggle navigation bar">
      <span class="toggle-line toggle-line-first"></span>
      <span class="toggle-line toggle-line-middle"></span>
      <span class="toggle-line toggle-line-last"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <h1 class="site-title">Feng's Blog</h1>
      <span class="logo-line-after"><i></i></span>
    </a>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
    </div>
  </div>
</div>




<nav class="site-nav">
  <ul id="menu" class="main-menu menu">
        <li class="menu-item menu-item-home">

    <a href="/" rel="section"><i class="fa fa-home fa-fw"></i>Home</a>

  </li>
        <li class="menu-item menu-item-about">

    <a href="/about/" rel="section"><i class="fa fa-user fa-fw"></i>About</a>

  </li>
        <li class="menu-item menu-item-tags">

    <a href="/tags/" rel="section"><i class="fa fa-tags fa-fw"></i>Tags</a>

  </li>
        <li class="menu-item menu-item-categories">

    <a href="/categories/" rel="section"><i class="fa fa-th fa-fw"></i>Categories</a>

  </li>
        <li class="menu-item menu-item-archives">

    <a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>Archives</a>

  </li>
  </ul>
</nav>




</div>
    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>


    <main class="main">
      <div class="main-inner">
        <div class="content-wrap">
          

          <div class="content post posts-expand">
            

    
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-Hans">
    <link itemprop="mainEntityOfPage" href="http://yoursite.com/2019/02/26/linux常用命令/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.gif">
      <meta itemprop="name" content="Fengorz">
      <meta itemprop="description" content="A Quiet Departure.">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Feng's Blog">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          linux常用用命令
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">Posted on</span>

              <time title="Created: 2019-02-26 22:00:21" itemprop="dateCreated datePublished" datetime="2019-02-26T22:00:21+08:00">2019-02-26</time>
            </span>
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="far fa-calendar-check"></i>
                </span>
                <span class="post-meta-item-text">Edited on</span>
                <time title="Modified: 2020-08-20 12:04:55" itemprop="dateModified" datetime="2020-08-20T12:04:55+08:00">2020-08-20</time>
              </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-folder"></i>
              </span>
              <span class="post-meta-item-text">In</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/linux/" itemprop="url" rel="index"><span itemprop="name">linux</span></a>
                </span>
            </span>

          

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
        <h2 id="返回上次所在目录"><a href="#返回上次所在目录" class="headerlink" title="返回上次所在目录"></a>返回上次所在目录</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">cd -</span><br><span class="line">cd $OLDPWD</span><br></pre></td></tr></table></figure>
<h2 id="修改权限"><a href="#修改权限" class="headerlink" title="修改权限"></a>修改权限</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"># 修改文件夹以及其子文件夹</span><br><span class="line">chmod -R 777 fileName</span><br></pre></td></tr></table></figure>
<h2 id="find和grep"><a href="#find和grep" class="headerlink" title="find和grep"></a>find和grep</h2><p>find是在系统中搜索符合条件的文件名，grep是在文件中搜索符合条件的字符串。<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">find ~/dir -name filename.txt</span><br><span class="line">grep &quot;someStr&quot; filename.txt</span><br><span class="line"># 查询某个文件夹下面大小大于某个值文件</span><br><span class="line">find ~/dir -type f -size +1G</span><br></pre></td></tr></table></figure></p>
<h2 id="ls-查询目录具体file"><a href="#ls-查询目录具体file" class="headerlink" title="ls 查询目录具体file"></a>ls 查询目录具体file</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"># 按照时间升序</span><br><span class="line">ls -lrt</span><br><span class="line"># 按照时间降序</span><br><span class="line">ls -lt</span><br></pre></td></tr></table></figure>
<h2 id="ll按时间排序"><a href="#ll按时间排序" class="headerlink" title="ll按时间排序"></a>ll按时间排序</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"># 升序</span><br><span class="line">ll -rt</span><br><span class="line"># 降序</span><br><span class="line">ll -t</span><br></pre></td></tr></table></figure>
<h2 id="ll按大小排序"><a href="#ll按大小排序" class="headerlink" title="ll按大小排序"></a>ll按大小排序</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"># 大小单位按照human-readable</span><br><span class="line">ll -Sh</span><br></pre></td></tr></table></figure>
<h2 id="ln链接命令"><a href="#ln链接命令" class="headerlink" title="ln链接命令"></a>ln链接命令</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">ln -s [源文件] [目标文件]</span><br><span class="line"># -s软链接，不带-s是硬链接，硬链接等于是copy了一份文件，软链接相当于window的快捷方式。</span><br><span class="line"># 硬链接不能对目录使用，删除源文件，硬链接可以正常使用，软连接不可以。</span><br></pre></td></tr></table></figure>
<h2 id="wget命令"><a href="#wget命令" class="headerlink" title="wget命令"></a>wget命令</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"># 拉取文件</span><br></pre></td></tr></table></figure>
<h2 id="tar"><a href="#tar" class="headerlink" title="tar"></a>tar</h2><p>tar -zxvf 用于解压  .tar.gz 后缀结尾的</p>
<p>tar -xvf 用于解压   .tar后缀结尾的</p>
<h2 id="touch"><a href="#touch" class="headerlink" title="touch"></a>touch</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"># 创建空白文件</span><br><span class="line">touch filename</span><br></pre></td></tr></table></figure>
<h2 id="nohup"><a href="#nohup" class="headerlink" title="nohup"></a>nohup</h2><p>后台不挂断执行，执行某个脚本，并将脚本的执行打印日志追加写入到某个文件：<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">nohup xxx.sh &gt;&gt; /usr/local/node/output.log 2&gt;&amp;1 &amp;</span><br></pre></td></tr></table></figure></p>
<p>jboss:<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"># 启动指定部署目录：</span><br><span class="line">nohup ./run.sh -c web38b -b 0.0.0.0  &gt;/dev/null 2&gt;&amp;1 &amp;</span><br></pre></td></tr></table></figure></p>
<blockquote>
<blockquote>
<p>/dev/null redirects standard output (stdout) to /dev/null, which discards it.<br>(The &gt;&gt; seems sort of superfluous, since &gt;&gt; means append while &gt; means truncate and write, and either appending to or writing to /dev/null has the same net effect. I usually just use &gt; for that reason.)<br>2&gt;&amp;1 redirects standard error (2) to standard output (1), which then discards it as well since standard output has already been redirected.</p>
</blockquote>
</blockquote>
<h2 id="更改所有子文件和子目录所有者权限"><a href="#更改所有子文件和子目录所有者权限" class="headerlink" title="更改所有子文件和子目录所有者权限"></a>更改所有子文件和子目录所有者权限</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">chmod -R 777 fileDir</span><br></pre></td></tr></table></figure>
<h2 id="curl"><a href="#curl" class="headerlink" title="curl"></a>curl</h2><p>curl -H “Content-Type:application/json” -X POST -d ‘json data’ URL<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">curl -H &quot;Content-Type:application/json&quot; -X POST -d &apos;&#123;&quot;user&quot;: &quot;admin&quot;, &quot;passwd&quot;:&quot;12345678&quot;&#125;&apos; http://127.0.0.1:8000/login</span><br></pre></td></tr></table></figure></p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">curl -d &quot;user=admin&amp;passwd=12345678&quot; http://127.0.0.1:8080/login</span><br></pre></td></tr></table></figure>
<p>监控某个网站的网页响应下载时间：<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">curl -o /dev/null -s -w ‘%&#123;time_total&#125;’ https://www.fengorz.me</span><br></pre></td></tr></table></figure></p>
<p>更多用法参考：<a href="https://www.cnblogs.com/taosim/articles/4092572.html" target="_blank" rel="noopener">https://www.cnblogs.com/taosim/articles/4092572.html</a></p>
<h2 id="df命令详解"><a href="#df命令详解" class="headerlink" title="df命令详解"></a>df命令详解</h2><p>whereis<br>which<br>xargs</p>
<h2 id="https-blog-csdn-net-wzzfeitian-article-details-40985549"><a href="#https-blog-csdn-net-wzzfeitian-article-details-40985549" class="headerlink" title="https://blog.csdn.net/wzzfeitian/article/details/40985549"></a><a href="https://blog.csdn.net/wzzfeitian/article/details/40985549" target="_blank" rel="noopener">https://blog.csdn.net/wzzfeitian/article/details/40985549</a></h2><p>标准输出重定向</p>
<h2 id="标准输出重定向到空，相当于忽略输出"><a href="#标准输出重定向到空，相当于忽略输出" class="headerlink" title="标准输出重定向到空，相当于忽略输出"></a>标准输出重定向到空，相当于忽略输出</h2><h2 id="查看防火墙，放开端口"><a href="#查看防火墙，放开端口" class="headerlink" title="查看防火墙，放开端口"></a>查看防火墙，放开端口</h2><h2 id="ps"><a href="#ps" class="headerlink" title="ps"></a>ps</h2><h2 id="killall"><a href="#killall" class="headerlink" title="killall"></a>killall</h2><p>结束所有进程<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">killall -9 picName</span><br></pre></td></tr></table></figure></p>
<p>##线上日志文件查看</p>
<h3 id="查看文件内容more命令"><a href="#查看文件内容more命令" class="headerlink" title="查看文件内容more命令"></a>查看文件内容more命令</h3><p><a href="https://www.runoob.com/linux/linux-comm-more.html" target="_blank" rel="noopener">https://www.runoob.com/linux/linux-comm-more.html</a></p>
<h3 id="less命令"><a href="#less命令" class="headerlink" title="less命令"></a>less命令</h3><p><a href="https://www.runoob.com/linux/linux-comm-less.html" target="_blank" rel="noopener">https://www.runoob.com/linux/linux-comm-less.html</a></p>
<h2 id="解压war包"><a href="#解压war包" class="headerlink" title="解压war包"></a>解压war包</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"># 解压到当前目录</span><br><span class="line">jar -xvf</span><br><span class="line"># 解压到指定目录</span><br><span class="line">unzip pay.war -d /home/zookeeper1/test/pay</span><br></pre></td></tr></table></figure>
<h2 id="du-Linux查看磁盘存储空间文件大小"><a href="#du-Linux查看磁盘存储空间文件大小" class="headerlink" title="du Linux查看磁盘存储空间文件大小"></a>du Linux查看磁盘存储空间文件大小</h2><p><a href="https://blog.csdn.net/zzldm/article/details/82804557" target="_blank" rel="noopener">https://blog.csdn.net/zzldm/article/details/82804557</a></p>
<p>查看对应目录大小<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">du -sh 路径</span><br></pre></td></tr></table></figure></p>
<h2 id="sed"><a href="#sed" class="headerlink" title="sed"></a>sed</h2><p>Linux sed 命令是利用脚本来处理文本文件。</p>
<p>sed 可依照脚本的指令来处理、编辑文本文件。</p>
<p>Sed 主要用来自动编辑一个或多个文件、简化对文件的反复操作、编写转换程序等。</p>
<p><a href="https://www.runoob.com/linux/linux-comm-sed.html" target="_blank" rel="noopener">https://www.runoob.com/linux/linux-comm-sed.html</a></p>
<h2 id="scp"><a href="#scp" class="headerlink" title="scp"></a>scp</h2><p>从本地复制到远程：<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">scp local_file remote_username@remote_ip:remote_folder </span><br><span class="line">或者 </span><br><span class="line">scp local_file remote_username@remote_ip:remote_file </span><br><span class="line">或者 scp local_file remote_ip:remote_folder </span><br><span class="line">或者 </span><br><span class="line">scp local_file remote_ip:remote_file</span><br></pre></td></tr></table></figure></p>
<p><a href="https://www.runoob.com/linux/linux-comm-scp.html" target="_blank" rel="noopener">https://www.runoob.com/linux/linux-comm-scp.html</a></p>
<h2 id="远程调用shell命令"><a href="#远程调用shell命令" class="headerlink" title="远程调用shell命令"></a>远程调用shell命令</h2><p><a href="https://www.cnblogs.com/ilfmonday/p/ShellRemote.html" target="_blank" rel="noopener">https://www.cnblogs.com/ilfmonday/p/ShellRemote.html</a></p>
<h2 id="Linux下如何查看版本信息"><a href="#Linux下如何查看版本信息" class="headerlink" title="Linux下如何查看版本信息"></a>Linux下如何查看版本信息</h2><p><a href="https://www.cnblogs.com/williamjie/p/10271945.html" target="_blank" rel="noopener">https://www.cnblogs.com/williamjie/p/10271945.html</a></p>
<h2 id="sleep"><a href="#sleep" class="headerlink" title="sleep"></a>sleep</h2><p>睡眠一段时间（5秒）<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sleep 5s</span><br></pre></td></tr></table></figure></p>
<h2 id="利用管道kill掉监听端口的进程"><a href="#利用管道kill掉监听端口的进程" class="headerlink" title="利用管道kill掉监听端口的进程"></a>利用管道kill掉监听端口的进程</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">kill -9 `lsof -i -n -P | grep ? | awk &apos;&#123;print $2&#125;&apos;`</span><br></pre></td></tr></table></figure>
<p>将问号换成对应的端口号</p>
<h2 id="tldr"><a href="#tldr" class="headerlink" title="tldr"></a>tldr</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"></span><br><span class="line"></span><br></pre></td></tr></table></figure>
<h2 id="top-查看内存状态"><a href="#top-查看内存状态" class="headerlink" title="top(查看内存状态)"></a>top(查看内存状态)</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">top -i（不显示任何闲置(Idle)或无用(Zombie)的行程）</span><br></pre></td></tr></table></figure>
<p><a href="https://www.jianshu.com/p/255b54b5445f" target="_blank" rel="noopener">https://www.jianshu.com/p/255b54b5445f</a></p>
<h2 id="cat"><a href="#cat" class="headerlink" title="cat"></a>cat</h2><blockquote>
<p>查看日志使用tail是不会显示行号的，如果要具体比对某些行，可以使用</p>
</blockquote>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">cat -n xxx</span><br></pre></td></tr></table></figure>
    </div>

    
    
    

      <footer class="post-footer">
          <div class="post-tags">
              <a href="/tags/linux/" rel="tag"># linux</a>
          </div>

        


        
    <div class="post-nav">
      <div class="post-nav-item">
    <a href="/2019/02/24/从eclipse转到idea的过程/" rel="prev" title="从eclipse转到idea的过程">
      <i class="fa fa-chevron-left"></i> 从eclipse转到idea的过程
    </a></div>
      <div class="post-nav-item">
    <a href="/2019/03/04/oracle系列之触发器/" rel="next" title="oracle系列之触发器">
      oracle系列之触发器 <i class="fa fa-chevron-right"></i>
    </a></div>
    </div>
      </footer>
    
  </article>
  
  
  



          </div>
          

<script>
  window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      let commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

        </div>
          
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line toggle-line-first"></span>
    <span class="toggle-line toggle-line-middle"></span>
    <span class="toggle-line toggle-line-last"></span>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          Table of Contents
        </li>
        <li class="sidebar-nav-overview">
          Overview
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
          <div class="post-toc motion-element"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#返回上次所在目录"><span class="nav-number">1.</span> <span class="nav-text">返回上次所在目录</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#修改权限"><span class="nav-number">2.</span> <span class="nav-text">修改权限</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#find和grep"><span class="nav-number">3.</span> <span class="nav-text">find和grep</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#ls-查询目录具体file"><span class="nav-number">4.</span> <span class="nav-text">ls 查询目录具体file</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#ll按时间排序"><span class="nav-number">5.</span> <span class="nav-text">ll按时间排序</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#ll按大小排序"><span class="nav-number">6.</span> <span class="nav-text">ll按大小排序</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#ln链接命令"><span class="nav-number">7.</span> <span class="nav-text">ln链接命令</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#wget命令"><span class="nav-number">8.</span> <span class="nav-text">wget命令</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#tar"><span class="nav-number">9.</span> <span class="nav-text">tar</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#touch"><span class="nav-number">10.</span> <span class="nav-text">touch</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#nohup"><span class="nav-number">11.</span> <span class="nav-text">nohup</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#更改所有子文件和子目录所有者权限"><span class="nav-number">12.</span> <span class="nav-text">更改所有子文件和子目录所有者权限</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#curl"><span class="nav-number">13.</span> <span class="nav-text">curl</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#df命令详解"><span class="nav-number">14.</span> <span class="nav-text">df命令详解</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#https-blog-csdn-net-wzzfeitian-article-details-40985549"><span class="nav-number">15.</span> <span class="nav-text">https://blog.csdn.net/wzzfeitian/article/details/40985549</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#标准输出重定向到空，相当于忽略输出"><span class="nav-number">16.</span> <span class="nav-text">标准输出重定向到空，相当于忽略输出</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#查看防火墙，放开端口"><span class="nav-number">17.</span> <span class="nav-text">查看防火墙，放开端口</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#ps"><span class="nav-number">18.</span> <span class="nav-text">ps</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#killall"><span class="nav-number">19.</span> <span class="nav-text">killall</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#查看文件内容more命令"><span class="nav-number">19.1.</span> <span class="nav-text">查看文件内容more命令</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#less命令"><span class="nav-number">19.2.</span> <span class="nav-text">less命令</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#解压war包"><span class="nav-number">20.</span> <span class="nav-text">解压war包</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#du-Linux查看磁盘存储空间文件大小"><span class="nav-number">21.</span> <span class="nav-text">du Linux查看磁盘存储空间文件大小</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#sed"><span class="nav-number">22.</span> <span class="nav-text">sed</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#scp"><span class="nav-number">23.</span> <span class="nav-text">scp</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#远程调用shell命令"><span class="nav-number">24.</span> <span class="nav-text">远程调用shell命令</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Linux下如何查看版本信息"><span class="nav-number">25.</span> <span class="nav-text">Linux下如何查看版本信息</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#sleep"><span class="nav-number">26.</span> <span class="nav-text">sleep</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#利用管道kill掉监听端口的进程"><span class="nav-number">27.</span> <span class="nav-text">利用管道kill掉监听端口的进程</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#tldr"><span class="nav-number">28.</span> <span class="nav-text">tldr</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#top-查看内存状态"><span class="nav-number">29.</span> <span class="nav-text">top(查看内存状态)</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#cat"><span class="nav-number">30.</span> <span class="nav-text">cat</span></a></li></ol></div>
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
  <p class="site-author-name" itemprop="name">Fengorz</p>
  <div class="site-description" itemprop="description">A Quiet Departure.</div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/archives/">
        
          <span class="site-state-item-count">125</span>
          <span class="site-state-item-name">posts</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
            <a href="/categories/">
          
        <span class="site-state-item-count">68</span>
        <span class="site-state-item-name">categories</span></a>
      </div>
      <div class="site-state-item site-state-tags">
            <a href="/tags/">
          
        <span class="site-state-item-count">87</span>
        <span class="site-state-item-name">tags</span></a>
      </div>
  </nav>
</div>



      </div>

    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer class="footer">
      <div class="footer-inner">
        

        

<div class="copyright">
  
  &copy; 
  <span itemprop="copyrightYear">2020</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Fengorz</span>
</div>
  <div class="powered-by">Powered by <a href="https://hexo.io" class="theme-link" rel="noopener" target="_blank">Hexo</a> & <a href="https://theme-next.org" class="theme-link" rel="noopener" target="_blank">NexT.Gemini</a>
  </div>

        








      </div>
    </footer>
  </div>

  
  <script src="/lib/anime.min.js"></script>
  <script src="/lib/velocity/velocity.min.js"></script>
  <script src="/lib/velocity/velocity.ui.min.js"></script>
<script src="/js/utils.js"></script><script src="/js/motion.js"></script>
<script src="/js/schemes/pisces.js"></script>
<script src="/js/next-boot.js"></script>



  















  

  

</body>
</html>
